int ston(char* str)//字符串转数字
{
    int num = 0;
    int i = 1;
    if(str==NULL)
        return 0;

    if(*str=='-')
    {
        i=-1;
        str++;
    }
    else if(*str=='+')
    {
        i=1;
        str++;
    }
    while(1)
    {
        if(*str>='0'&&*str<='9')
        {
            num+=*str-'0';
            str++;
            num*=10;
        }
        else
        {
            str++;
        }
        if(*str=='\0')break;
    }
    num*=i;
    return num/10;
}